package com.springlistener;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

import static com.util.Printer.print;

/**
 * @Author Fizz Pu
 * @Date 2021/4/28 下午8:17
 * @Version 1.0
 * 失之毫厘，缪之千里！
 */

@Component
public class MyListener implements ApplicationListener<MyEvent> {

    @Override
    public void onApplicationEvent(MyEvent myEvent) {
        print("我是第二个监听器");
        print(myEvent.getMessage());
    }
}
